package com.mall.admin.controller;

import com.mall.admin.service.OmsCompanyAddressService;
import com.mall.commons.utils.R;
import com.mall.domain.OmsCompanyAddress;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/companyAddress")
public class OmsCompanyAddressController {

    @Autowired
    private OmsCompanyAddressService companyAddressService;

    /**
     * 获取所有收货地址
     * @return
     */
    @GetMapping("/list")
    public R list() {
        List<OmsCompanyAddress> list = companyAddressService.list();
        return R.success("获取成功",list);
    }

}
